{% extends "base.html" %}
{% block content %}
<h2>Staff</h2>
<table>
<tr>
  <th>ID</th>
  <th>Name</th>
  <th>Gender</th>
  <th>Age</th>
  <th>Role</th>
  <th>Department</th>
  <th>Phone</th>
  <th>Email</th>
  <th>Actions</th>
</tr>
{% for s in staff %}
<tr>
  <td>{{ s.staff_id }}</td>
  <td>{{ s.name }}</td>
  <td>{{ s.gender }}</td>
  <td>{{ s.age }}</td>
  <td>{{ s.role }}</td>
  <td>{{ s.dept_name }}</td>
  <td>{{ s.phone }}</td>
  <td>{{ s.email }}</td>
  <td>
    <a href="{{ url_for('staff_edit', staff_id=s.staff_id) }}">Edit</a>
    <form action="{{ url_for('staff_delete', staff_id=s.staff_id) }}" method="post" style="display:inline">
      <button>Delete</button>
    </form>
  </td>
</tr>
{% endfor %}
</table>
<a href="{{ url_for('staff_new') }}">Add New Staff</a>
{% endblock %}
